import { App } from 'vue'
import type { Plugin } from 'vue'
import { withInstall } from '@v-model/shared--utils'
import components from './components'
import './src/styles/index.scss'
export * from './src/index'

// 重复引用 ，通过 export { } 可以多个导入

// import _FigureCard from './src/v-chart/FigureCard.vue'
// import _HexagonA from './src/v-chart/HexagonA.vue'
// import _HexagonB from './src/v-chart/HexagonB.vue'
// import _Hydrograph from './src/v-chart/Hydrograph.vue'
// import _RectangleA from './src/v-chart/RectangleA.vue'

//提供全局注册
// const FigureCard = withInstall(_FigureCard)
// const HexagonA = withInstall(_HexagonA)
// const HexagonB = withInstall(_HexagonB)
// const Hydrograph = withInstall(_Hydrograph)
// const RectangleA = withInstall(_RectangleA)

//提供单个导入
export * from './components'

//提供全局注册
const modules: any = {
  // FigureCard,
  // HexagonA,
  // HexagonB,
  // Hydrograph,
  // RectangleA,
  ...components,
}

export default {
  install: (app: App, options: {}) => {
    for (let c in modules) {
      app.use(modules[c])
    }
  },
}
